/**
 * 仿JSON内置API parse方法
 * @param {String} javaData JSON数据格式
 * @returns Object
 */
function parse(javaData)
{
   
    let webObj = {}
    
    javaData = javaData.replace(/{|}|"|\s/g, '')
    
    let javaDataArr = javaData.split(',')
    
    javaDataArr.forEach(item => {
        
        let temp = item.split(':')
        let key = temp[0]
        let val = temp[1] 
        
        webObj[key] = val
    })
   
    return webObj
}

/**
 * 仿JSON内置API stringify方法
 * @param {Object} webObj JS标准普通对象
 * @returns String
 */
function stringify(webObj)
{
    
    let arr = []
    
    for (let key in webObj)
    {
        let temp = `"${key}":"${webObj[key]}"`
        arr.push(temp)
    }
    
    return `{${arr.join(',')}}`
}